CC = gcc
ASM = nasm
CFLAGS = -m32 -Wall -g -O0
ASMFLAGS = -f elf32

TARGET = task_switch_test
OBJECTS = task_switch.o main.o

all: $(TARGET)

$(TARGET): $(OBJECTS)
	$(CC) $(CFLAGS) -o $@ $^

main.o: main.c
	$(CC) $(CFLAGS) -c $< -o $@

task_switch.o: task_switch.asm
	$(ASM) $(ASMFLAGS) $< -o $@

clean:
	rm -f $(TARGET) $(OBJECTS)

.PHONY: all clean
